{% extends 'CaisseBundle::layout.html.twig' %} 
{% block body %} 
<div id="body_section">
  <div id="body_section_inner">
<div class="contentPageWrapper">
	 
    <!-- register form -->
    <div class="pageSectionMain ui-corner-all">
        <div class="pageSectionMainInternal">
            <div id="pageHeader">
                <h2>{% if id == '' %}Nouvelle table{% else %}Modifier la catégorie{% endif %}</h2>
            </div>
            <div>
                <p class="introText">
                       </p>
                    <script type='text/javascript' src='/js/jquery-1.7.2.min.js?ver=3.4.1'></script>
                    <script type="text/javascript" src="js/gen_validatorv4.js"></script>
                    <form enctype="multipart/form-data" class="international" method="post" action="{{path('caisse_ajout_table')}}" id="form-join" name="addproduct" {{form_enctype(form)}}>
                <input type="hidden" name="MAX_FILE_SIZE" value="204800">
                    <ul><input type="hidden" value="{{id}}" name="id" />
                        <li class="field-container"><label for="pr_code">
                                <span class="field-name">Num Table</span>
                                <div class="form_input">
                                                  {{form_widget(form._token)}} {{ form_widget(form.numTable,{'attr':{'class':'large'}})}}  
                                        </div>     
                        </li>
                        
		

                        
                        <li class="field-container">
                            <span class="field-name"></span>
                            <input type="submit" name="submit" value="{% if id == '' %}Ajouter une table{% endif %}" class="submitInput ui-button ui-widget ui-state-default ui-corner-all" role="button">
                            <input type="reset" value="Initialiser" class="submitInput ui-button ui-widget ui-state-default ui-corner-all" role="button"/>
                        </li> 
                    </ul>

                    <input type="hidden" value="1" name="submitme">
                </form>
                <script language="JavaScript">
                var frmvalidator  = new Validator("addproduct");
                frmvalidator.addValidation("pr_code","req","<?php echo $LANG['code_error']; ?>...");
                frmvalidator.addValidation("pr_name","req","<?php echo $LANG['description_error']; ?>...");
				frmvalidator.addValidation("quantity","req","<?php echo $LANG['quantity_error']; ?>...");
				frmvalidator.addValidation("quantity","num","<?php echo $LANG['quantity_error2']; ?>...");
				frmvalidator.addValidation("unit","req","<?php echo $LANG['unit_error']; ?>...");
				frmvalidator.addValidation("alert_qt","req","<?php echo $LANG['alert_qt_error']; ?>...");
				frmvalidator.addValidation("alert_qt","num","<?php echo $LANG['alert_qt_error2']; ?>...");
				// frmvalidator.addValidation("image","req","Please select product image to upload...");
                </script>

                <div class="clear"></div>
            </div>
        </div>
    </div>
        <div class="clear"><!-- --></div>
</div>

<div class="clr"></div>

  </div>
  <div class="clear"></div>

</div>

{% endblock body %} 